﻿@using WineStore.Extends;
@model WineStore.Models.Banner
@{
    ViewBag.Title = "EditBanner";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}

@section Styles
{
    <style type="text/css">
        input, textarea {
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 3px;
            width: 200px;
            color: #333;
            box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
            -moz-box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
            -webkit-box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
        }

        textarea {
            width: 400px;
            height: 100px;
            max-width: 400px;
            line-height: 18px;
            border-radius: 3px;
        }

            input:hover, textarea:hover,
            input:focus, textarea:focus {
                border-color: 10px solid #C9C9C9;
                box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
                -moz-box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
                -webkit-box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
                border-radius: 3px;
            }

        input .submit{
            height: 38px;
            background-color: #474E69;
            color: #FFF;
            border-radius: 3px;
            -moz-border-radius: 3px;
            -webkit-border-radius: 3px;
        }
    </style>
}
@*@if (Session["Admin"] != null)
{
    *@<h3 class="tit">Edit Banner
    </h3>
    <fieldset>
        <legend>Edit Banner</legend>
        @using (Html.BeginForm("EditBanner", "Banner", FormMethod.Post, new { enctype = "multipart/form-data" }))
        { 
            @Html.HiddenFor(model => model.BannerId)
            <table class="nostyle">
                <tbody>
                    <tr>
                        <td style="vertical-align: middle">Title (English)
                        </td>
                        <td style="color: Red;">
                            @Html.TextAreaFor(model => model.BannerTitle_EN, new { rows = "3", columns = "50", @class = "text-box-des" })
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle">Title (German)
                        </td>
                        <td style="color: Red;">
                            @Html.TextAreaFor(model => model.BannerTitle_GER, new { rows = "3", columns = "50", @class = "text-box-des" })
                        </td>
                    </tr>
                    <tr>
                        <td>Display Order
                        </td>
                        <td>
                            @Html.EditorFor(model => model.BannerPosition)
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle;">Image<span style="color: Red">(*)</span>
                        </td>
                        <td>
                            @Html.ImageFor(model => "../../Content/Images/Banners/" + model.BannerImage, new { width = "450px", height = "400px", alt = "some alt text" })
                            @Html.TextBoxFor(model => model.BannerImage, new { type = "file" })
                        </td>
                        <td style="color: Red;"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" value="Edit Banner" class="submit" style="width:100px;"/>
                        </td>
                    </tr>
                </tbody>
            </table>
        }
    </fieldset>
@*}
else
{
    Response.Redirect("~/Admin/LogOn/");
}*@